package com.example.pos;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.RelativeLayout;

public class MenuHomeActivity extends AppCompatActivity {

    RelativeLayout rl_qtdb;
    RelativeLayout rl_qtsy;
    RelativeLayout rl_qtjb;
    RelativeLayout rl_sjjh;
    RelativeLayout rl_qtpd;
    RelativeLayout rl_cssz;
    RelativeLayout rl_lxsy;
    RelativeLayout rl_ygkq;
    RelativeLayout rl_bhsq;
    RelativeLayout rl_exit;

    Intent intent;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_menu_home);

        intent = getIntent();
        final String  str_usn = intent.getStringExtra("usn");

        rl_qtdb = findViewById(R.id.rl_qtdb);

        rl_qtdb.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(MenuHomeActivity.this, QtdbActivity.class);
                intent.putExtra("usn", str_usn);
                startActivity(intent);
            }
        });

        rl_qtsy = findViewById(R.id.rl_qtsy);

        rl_qtsy.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(MenuHomeActivity.this, QtsyActivity.class));
            }
        });

        rl_qtjb = findViewById(R.id.rl_qtjb);

        rl_qtjb.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(MenuHomeActivity.this, QtjbActivity.class));
            }
        });


        rl_sjjh = findViewById(R.id.rl_sjjh);

        rl_sjjh.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(MenuHomeActivity.this, SjjhActivity.class));
            }
        });


        rl_qtpd = findViewById(R.id.rl_qtpd);

        rl_qtpd.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(MenuHomeActivity.this, QtpdActivity.class));
            }
        });

        rl_cssz = findViewById(R.id.rl_cssz);

        rl_cssz.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(MenuHomeActivity.this, CsszActivity.class));
            }
        });

        rl_lxsy = findViewById(R.id.rl_lxsy);

        rl_lxsy.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(MenuHomeActivity.this, LxsyActivity.class));
            }
        });

        rl_ygkq = findViewById(R.id.rl_ygkq);

        rl_ygkq.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(MenuHomeActivity.this, YgkqActivity.class));
            }
        });

        rl_bhsq = findViewById(R.id.rl_bhsq);

        rl_bhsq.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(MenuHomeActivity.this, BhsqActivity.class));
            }
        });


        //退出系统
        rl_exit = findViewById(R.id.rl_exit);

        rl_exit.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(MenuHomeActivity.this, LoginActivity.class));
                finish();
            }
        });


    }
}